Optimal. Leaf size=104 \[ \frac {3 x}{8 a}+\frac {\cos (c+d x)}{a d}-\frac {2 \cos ^3(c+d x)}{3 a d}+\frac {\cos ^5(c+d x)}{5 a d}-\frac {3 \cos (c+d x) \sin (c+d x)}{8 a d}-\frac {\cos (c+d x) \sin ^3(c+d x)}{4 a d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.09, antiderivative size = 104, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 4, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.138, Rules used = {2918, 2715, 8,
2713} \begin {gather*} \frac {\cos ^5(c+d x)}{5 a d}-\frac {2 \cos ^3(c+d x)}{3 a d}+\frac {\cos (c+d x)}{a d}-\frac {\sin ^3(c+d x) \cos (c+d x)}{4 a d}-\frac {3 \sin (c+d x) \cos (c+d x)}{8 a d}+\frac {3 x}{8 a} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2713
Rule 2715
Rule 2918
Rubi steps
\begin {align*} \int \frac {\cos ^2(c+d x) \sin ^4(c+d x)}{a+a \sin (c+d x)} \, dx &=\frac {\int \sin ^4(c+d x) \, dx}{a}-\frac {\int \sin ^5(c+d x) \, dx}{a}\\ &=-\frac {\cos (c+d x) \sin ^3(c+d x)}{4 a d}+\frac {3 \int \sin ^2(c+d x) \, dx}{4 a}+\frac {\text {Subst}\left (\int \left (1-2 x^2+x^4\right ) \, dx,x,\cos (c+d x)\right )}{a d}\\ &=\frac {\cos (c+d x)}{a d}-\frac {2 \cos ^3(c+d x)}{3 a d}+\frac {\cos ^5(c+d x)}{5 a d}-\frac {3 \cos (c+d x) \sin (c+d x)}{8 a d}-\frac {\cos (c+d x) \sin ^3(c+d x)}{4 a d}+\frac {3 \int 1 \, dx}{8 a}\\ &=\frac {3 x}{8 a}+\frac {\cos (c+d x)}{a d}-\frac {2 \cos ^3(c+d x)}{3 a d}+\frac {\cos ^5(c+d x)}{5 a d}-\frac {3 \cos (c+d x) \sin (c+d x)}{8 a d}-\frac {\cos (c+d x) \sin ^3(c+d x)}{4 a d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(281\) vs. \(2(104)=208\).
time = 3.73, size = 281, normalized size = 2.70 \begin {gather*} \frac {1}{480} \left (\frac {180 x}{a}+\frac {300 \cos (c) \cos (d x)}{a d}-\frac {50 \cos (3 c) \cos (3 d x)}{a d}+\frac {6 \cos (5 c) \cos (5 d x)}{a d}-\frac {120 \cos (2 d x) \sin (2 c)}{a d}+\frac {15 \cos (4 d x) \sin (4 c)}{a d}-\frac {300 \sin (c) \sin (d x)}{a d}-\frac {120 \cos (2 c) \sin (2 d x)}{a d}+\frac {50 \sin (3 c) \sin (3 d x)}{a d}+\frac {15 \cos (4 c) \sin (4 d x)}{a d}-\frac {6 \sin (5 c) \sin (5 d x)}{a d}-\frac {60 \sin \left (\frac {d x}{2}\right )}{a d \left (\cos \left (\frac {c}{2}\right )+\sin \left (\frac {c}{2}\right )\right ) \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )}+\frac {30 \sin (c+d x)}{a d (1+\sin (c+d x))}+\frac {60 \sin ^2\left (\frac {1}{2} (c+d x)\right )}{d (a+a \sin (c+d x))}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.21, size = 116, normalized size = 1.12
method | result | size |
risch | \(\frac {3 x}{8 a}+\frac {5 \cos \left (d x +c \right )}{8 a d}+\frac {\cos \left (5 d x +5 c \right )}{80 a d}+\frac {\sin \left (4 d x +4 c \right )}{32 a d}-\frac {5 \cos \left (3 d x +3 c \right )}{48 a d}-\frac {\sin \left (2 d x +2 c \right )}{4 a d}\) | \(90\) |
derivativedivides | \(\frac {\frac {32 \left (\frac {3 \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{128}+\frac {7 \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{64}+\frac {\left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3}-\frac {7 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{64}+\frac {\left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{6}-\frac {3 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{128}+\frac {1}{30}\right )}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{5}}+\frac {3 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4}}{a d}\) | \(116\) |
default | \(\frac {\frac {32 \left (\frac {3 \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{128}+\frac {7 \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{64}+\frac {\left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3}-\frac {7 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{64}+\frac {\left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{6}-\frac {3 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{128}+\frac {1}{30}\right )}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{5}}+\frac {3 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4}}{a d}\) | \(116\) |
norman | \(\frac {-\frac {\tan ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )}{4 a d}+\frac {3 x}{8 a}+\frac {19}{60 a d}-\frac {13 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{30 a d}+\frac {3 x \left (\tan ^{12}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 a}+\frac {3 x \left (\tan ^{13}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 a}+\frac {9 x \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 a}+\frac {45 x \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 a}+\frac {45 x \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 a}+\frac {15 x \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 a}+\frac {9 x \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 a}+\frac {9 x \left (\tan ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 a}+\frac {9 x \left (\tan ^{11}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 a}+\frac {15 x \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 a}+\frac {45 x \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 a}+\frac {45 x \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 a}-\frac {3 \left (\tan ^{13}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d a}-\frac {5 \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{6 a d}-\frac {47 \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{6 a d}+\frac {5 \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 a d}-\frac {31 \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 a d}-\frac {47 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{20 a d}+\frac {3 x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{8 a}-\frac {7 \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a d}+\frac {23 \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{20 a d}+\frac {\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )}{2 a d}-\frac {15 \left (\tan ^{11}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 a d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{6} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}\) | \(490\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 258 vs.
\(2 (94) = 188\).
time = 0.49, size = 258, normalized size = 2.48 \begin {gather*} -\frac {\frac {\frac {45 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {320 \, \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {210 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} - \frac {640 \, \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} - \frac {210 \, \sin \left (d x + c\right )^{7}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{7}} - \frac {45 \, \sin \left (d x + c\right )^{9}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{9}} - 64}{a + \frac {5 \, a \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {10 \, a \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} + \frac {10 \, a \sin \left (d x + c\right )^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}} + \frac {5 \, a \sin \left (d x + c\right )^{8}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{8}} + \frac {a \sin \left (d x + c\right )^{10}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{10}}} - \frac {45 \, \arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a}}{60 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.35, size = 68, normalized size = 0.65 \begin {gather*} \frac {24 \, \cos \left (d x + c\right )^{5} - 80 \, \cos \left (d x + c\right )^{3} + 45 \, d x + 15 \, {\left (2 \, \cos \left (d x + c\right )^{3} - 5 \, \cos \left (d x + c\right )\right )} \sin \left (d x + c\right ) + 120 \, \cos \left (d x + c\right )}{120 \, a d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 1360 vs.
\(2 (85) = 170\).
time = 17.00, size = 1360, normalized size = 13.08 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.48, size = 114, normalized size = 1.10 \begin {gather*} \frac {\frac {45 \, {\left (d x + c\right )}}{a} + \frac {2 \, {\left (45 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} + 210 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 640 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 210 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 320 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 45 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 64\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{5} a}}{120 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 11.91, size = 107, normalized size = 1.03 \begin {gather*} \frac {3\,x}{8\,a}+\frac {\frac {3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9}{4}+\frac {7\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7}{2}+\frac {32\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{3}-\frac {7\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{2}+\frac {16\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{3}-\frac {3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{4}+\frac {16}{15}}{a\,d\,{\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}^5} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________